// 项目根组件 路由配置页面
import React from 'react'
import Home from './pages/Home'
import CityList from './pages/CityList'
import NotFound from './pages/NotFound'

import { HashRouter,Route,Redirect,Switch } from 'react-router-dom';
export default function App() {
    return (
        <HashRouter>
            <Switch>
            {/* 路径和页面组件的关系  精准exact */}
            <Route exact path="/" render={() => {<Redirect to="/home" />}} />
            <Route path="/home" component={ Home } />
            <Route path="/citylist" component={CityList} />

            <Route path="*" component={NotFound} />
            </Switch>
        </HashRouter>
    )
}
